<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class ServiceSnapshot extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //   `user_nickname` varchar(255) NOT NULL COMMENT '用户名称',
        //  `user_icon` varchar(255) NOT NULL COMMENT '用户头像',
        //  `user_phone` varchar(255) NOT NULL COMMENT '用户手机号',
        //  `user_province` varchar(255) NOT NULL COMMENT '用户省份',
        //  `user_city` varchar(255) NOT NULL COMMENT '用户城市',
        //  `user_district` varchar(255) NOT NULL COMMENT '用户区域',
        //  `service_category` varchar(255) NOT NULL COMMENT '服务分类名称',
        //  `service_name` varchar(255) NOT NULL COMMENT '服务名称',
        //  `service_price` decimal(11,2) NOT NULL COMMENT '服务金额',
        //  `service_time` int(11) NOT NULL COMMENT '服务时间（单位分）',
        //  `service_remarks` text NOT NULL COMMENT '服务备注',
        //  `service_media` varchar(255) NOT NULL COMMENT '服务媒体（首图）'
        Schema::dropIfExists('service_snapshot');
        Schema::create('service_snapshot', function (Blueprint $table){
            $table->comment = "服务快照";
            $table->increments('id')->comment("ID");

            $table->string("user_nickname")->comment("用户名称");
            $table->string("user_icon")->comment("用户头像");
            $table->string("user_phone")->comment("用户手机号");
            $table->string("user_province")->comment("用户省份");
            $table->string("user_city")->comment("用户城市");
            $table->string("user_district")->comment("用户区域");
            $table->string("service_category")->comment("服务分类名称");
            $table->string("service_name")->comment("服务名称");
            $table->integer("service_time")->comment("服务时间/分");
            $table->decimal("service_price")->comment("服务金额");
            $table->text("service_remarks")->comment("服务备注");
            $table->string("service_media")->comment("服务媒体");


            $table->integer('create_time')->comment("创建时间");
            $table->integer('update_time')->comment("更新时间");
        });
    }
}
